#ifndef STAR_RECOGNITION_H
#define STAR_RECOGNITION_H

#include <QObject>
#include <QtGui/QWidget>
#include <QtGui/QKeyEvent>
#include <srec.h>
#include <cv.h>
#include <vector>
#include "ui_star_recognition.h"

using namespace sr;

class star_recognition: public QWidget
{
Q_OBJECT
public:
	star_recognition(QWidget *parent = 0);
	~star_recognition();
	void set_stars(std::vector<Star> const & stars);

private:
	Ui::star_recognitionClass ui;
	int center_ra;
	int center_dec;
	int visibility_radius;
	std::vector<Star> stars;
	QGraphicsScene * scene;

	QString to_2d(int a);
	void renew_params();
	void rescene_stars();
	QColor cv_to_q(cv::Scalar color);

protected:

	void keyPressEvent(QKeyEvent * event);
};

#endif // STAR_RECOGNITION_H
